<template>
  <div>
    <!-- van-dialog
          v-model:控制弹框是否显示
          title:标题
          默认插槽：内部显示的内容

-->

    <van-button @click="show = true">显示弹框</van-button>
    <van-dialog
      title="弹框标题"
      v-model="show"
      show-cancel-button
      @confirm="confirmEvent"
    >
      <h3>我是测试一下弹框的内容</h3>
    </van-dialog>
  </div>
</template>
<script>
export default {
  data () {
    return {
      show: false
    }
  },
  methods: {
    confirmEvent () {
      console.log('你点击了确定')
    }
  }
}
</script>
<style></style>
